package com.spiden.bazaspiden.pipeline;

import us.codecraft.webmagic.ResultItems;
import us.codecraft.webmagic.Task;
import us.codecraft.webmagic.pipeline.Pipeline;

/**
 * @author 张高昌
 * @date 2024/1/4 19:42
 * @description: 爬取到的数据入库操作
 */
public class OschinaPipeline implements Pipeline {

    @Override
    public void process(ResultItems resultItems, Task task) {
        String title = resultItems.get("title");             //文章题目
        String context = resultItems.get("content");               //文章内容
        System.out.println("标题：" + title);
        System.out.println("内容：" + context);
    }
}
